package com.mbc.hr.entities;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@SuppressWarnings("serial")
@Entity
@Table(name="hr_earlydeparturepenaltydetails")
@NamedQueries({
	@NamedQuery(name="EarlyDeparturePenaltyDetail.findByPenaltyID", query="SELECT d FROM EarlyDeparturePenaltyDetail d WHERE d.attendancePenaltyID = :attendancePenaltyID"),
	@NamedQuery(name="EarlyDeparturePenaltyDetail.deleteByPenaltyID", query="DELETE FROM EarlyDeparturePenaltyDetail d WHERE d.attendancePenaltyID = :attendancePenaltyID"),
	@NamedQuery(name="EarlyDeparturePenaltyDetail.getPenaltyDetailsByEmployeeID", query="SELECT apd FROM EarlyDeparturePenaltyDetail apd, AttendancePolicy ap, EmployeeGroup eg, Employee e WHERE e.employeeGroupID = eg.employeeGroupID AND eg.attendancePolicyID = ap.attendancePolicyID AND ap.attendancePenaltyID = apd.attendancePenaltyID AND e.employeeID = :employeeID")
})
public class EarlyDeparturePenaltyDetail implements Serializable {
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private long earlyDeparturePenaltyDetailsID;
	private long attendancePenaltyID;
	private int fromEarlyTime;
	private int toEarlyTime;
	private float absenceType;
	private int penaltyType;
	
	
	public int getFromEarlyTime() {
		return fromEarlyTime;
	}
	public void setFromEarlyTime(int fromEarlyTime) {
		this.fromEarlyTime = fromEarlyTime;
	}
	public int getToEarlyTime() {
		return toEarlyTime;
	}
	public void setToEarlyTime(int toEarlyTime) {
		this.toEarlyTime = toEarlyTime;
	}
	public float getAbsenceType() {
		return absenceType;
	}
	public void setAbsenceType(float absencePeriod) {
		this.absenceType = absencePeriod;
	}
	public long getEarlyDeparturePenaltyDetailsID() {
		return earlyDeparturePenaltyDetailsID;
	}
	public void setEarlyDeparturePenaltyDetailsID(long earlyDeparturePenaltyDetailsID) {
		this.earlyDeparturePenaltyDetailsID = earlyDeparturePenaltyDetailsID;
	}
	public long getAttendancePenaltyID() {
		return attendancePenaltyID;
	}
	public void setAttendancePenaltyID(long attendancePenaltyID) {
		this.attendancePenaltyID = attendancePenaltyID;
	}
	public int getPenaltyType() {
		return penaltyType;
	}
	public void setPenaltyType(int penaltyType) {
		this.penaltyType = penaltyType;
	}
}
